<?php
//$id_member = $_GET['id_member'];

include "koneksi.php";

$response = array();

	$id_member = $_POST['id_member'];
	$konsultasi = $_POST['konsultasi'];
	$tanggal = date("Y-m-d");

    $input_konsultasi = mysql_query("INSERT INTO konsultasi (
											id_member,
											tgl_konsultasi,
											konsultasi
											)
											VALUES(
											'$id_member',
											'$tanggal',
											'$konsultasi'		
											)");

    if ($input_konsultasi) {

        $response["hasil"] = 1;
        $response["message"] = "Berhasil input";

        echo json_encode($response);
		
    } else {

        $response["hasil"] = 0;
        $response["message"] = "Oops! An error occurred.";
        
        echo json_encode($response);
    }

?>